package com.xbongbong.pro.businessdata.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.ConditionsEntityExt;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/22 11:13
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class HasCommunicatePlanDTO extends BaseDTO {

    private static final long serialVersionUID = 6668759504188071884L;

    /**
     * 业务类型
     */
    @NotNull(message = "{dto.msg.hasCommunicatePlan.businessType.NotNull}")
    private Integer businessType;

    /**
     * 子业务类型
     */
    private Integer subBusinessType;

    /**
     * 表单id,多模板业务必传
     */
    @NotNull(message = "{dto.msg.hasCommunicatePlan.formId.NotNull}")
    private Long formId;

    /**
     * saas标记
     */
    @NotNull(message = "{dto.msg.hasCommunicatePlan.saasMark.NotNull}")
    private Integer saasMark;

    /**
     * 分页当前页
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer page;

    /**
     * 分页每页记录数
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer pageSize;

    /**
     * 模糊搜索
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String nameLike;

    /**
     * 关联id(父业务)
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long parentId;

    /**
     * 关联类型(父业务)
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer parentBusinessType;

    /**
     * 源业务类型
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer sourceBusinessType;

    /**
     * 入库单选择生产单有两种情况，该属性值用于区分成品入库和退料入库
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer type;
    /**
     * 搜索条件
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<ConditionsEntityExt> conditions;
    /**
     * 搜索条件
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<List<ConditionsEntityExt>> shouldConditions;

    /**
     * idIn
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<Long> idIn;

    /**
     * 类别id
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String categoryId;

    @Getter(onMethod_ = {@QueryIgnore})
    private String attr;

    /**
     * 数据，用于搜索
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private JSONObject data;

    public HasCommunicatePlanDTO() {
        conditions = new ArrayList<>();
        shouldConditions = new ArrayList<>();
    }

}